package juc;

import java.util.List;
import java.util.UUID;
import java.util.concurrent.CopyOnWriteArrayList;

public class ObjectReference {

    public static void main(String[] args) {
        String[] abc = {"111","222"};
        String a = "aaa";
        String b = "bbb";


        swap(a,b,abc);
        System.out.println(a);
        System.out.println(b);
        System.out.println(abc[0]);
    }

    private static void swap(String a, String b,String[] abc) {
        String temp = a;
        a = b;
        b = temp;
        abc[0] = "333";
        a = "12345";
        System.out.println("a:"+a);
        System.out.println("b:"+b);
        System.out.println(abc[0]);
    }
}
